﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DomainModel.Entities.Album>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Edit</h2>
<% using (Html.BeginForm("Edit", "Album", FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Album</legend>
          <%= Html.Hidden("referringurl") %>
         <%: Html.HiddenFor(model => model.AlbumID) %>
         <%: Html.HiddenFor(model => model.PictureID) %>
         <%: Html.HiddenFor(model => model.ArtistID) %>        
          

        <div class="editor-label">
            <%: Html.LabelFor(model => model.AlbumName) %>
        </div>

         <div class="editor-label">
            <%: Html.Label("") %>
        </div>
        <div class="editor-field">
            <%= Html.Image(Model.Picture, new { width="200", height="220" })%>
        </div> 
         <% Html.RenderPartial("UcPicture"); %>


        <div class="editor-field">
            <%: Html.EditorFor(model => model.AlbumName) %>
            <%: Html.ValidationMessageFor(model => model.AlbumName) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.AlbumReleaseYear) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.AlbumReleaseYear) %>
            <%: Html.ValidationMessageFor(model => model.AlbumReleaseYear) %>
        </div>  

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
<% } %>

<div>    
     <a href="<%: ViewData["referringUrl"].ToString() %>">Back to List</a>
</div>

</asp:Content>

